home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource4
/
223_01
/
reverse.c
< prev
next >
Wrap
Text File
|
1979-12-31
|
384b
|
17 lines
#define NOCCARGC /* no argument count passing */
/*
** reverse string in place
*/
static char *j;
static int c;
reverse(s) char *s; {
j = s + strlen(s) - 1;
while(s < j) {
c = *s;
*s++ = *j;
*j-- = c;
}
}